package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 
 * @TableName schedule
 */
@TableName(value ="schedule")
public class Schedule {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Schedule date
     */
    @TableField(value = "schedule_date")
    private Date scheduleDate;

    /**
     * Department ID
     */
    @TableField(value = "department_id")
    private Integer departmentId;

    /**
     * Doctor ID
     */
    @TableField(value = "doctor_id")
    private Integer doctorId;

    /**
     * Time period (AM/PM)
     */
    @TableField(value = "time_period")
    private String timePeriod;

    /**
     * Schedule schedule_rule ID
     */
    @TableField(value = "schedule_rule_id")
    private Integer scheduleRuleId;

    /**
     * Delete flag
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Schedule date
     */
    public Date getScheduleDate() {
        return scheduleDate;
    }

    /**
     * Schedule date
     */
    public void setScheduleDate(Date scheduleDate) {
        this.scheduleDate = scheduleDate;
    }

    /**
     * Department ID
     */
    public Integer getDepartmentId() {
        return departmentId;
    }

    /**
     * Department ID
     */
    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    /**
     * Doctor ID
     */
    public Integer getDoctorId() {
        return doctorId;
    }

    /**
     * Doctor ID
     */
    public void setDoctorId(Integer doctorId) {
        this.doctorId = doctorId;
    }

    /**
     * Time period (AM/PM)
     */
    public String getTimePeriod() {
        return timePeriod;
    }

    /**
     * Time period (AM/PM)
     */
    public void setTimePeriod(String timePeriod) {
        this.timePeriod = timePeriod;
    }

    /**
     * Schedule schedule_rule ID
     */
    public Integer getScheduleRuleId() {
        return scheduleRuleId;
    }

    /**
     * Schedule schedule_rule ID
     */
    public void setScheduleRuleId(Integer scheduleRuleId) {
        this.scheduleRuleId = scheduleRuleId;
    }

    /**
     * Delete flag
     */
    public Integer getIsDeleted() {
        return isDeleted;
    }

    /**
     * Delete flag
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Schedule other = (Schedule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getScheduleDate() == null ? other.getScheduleDate() == null : this.getScheduleDate().equals(other.getScheduleDate()))
            && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()))
            && (this.getDoctorId() == null ? other.getDoctorId() == null : this.getDoctorId().equals(other.getDoctorId()))
            && (this.getTimePeriod() == null ? other.getTimePeriod() == null : this.getTimePeriod().equals(other.getTimePeriod()))
            && (this.getScheduleRuleId() == null ? other.getScheduleRuleId() == null : this.getScheduleRuleId().equals(other.getScheduleRuleId()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getScheduleDate() == null) ? 0 : getScheduleDate().hashCode());
        result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
        result = prime * result + ((getDoctorId() == null) ? 0 : getDoctorId().hashCode());
        result = prime * result + ((getTimePeriod() == null) ? 0 : getTimePeriod().hashCode());
        result = prime * result + ((getScheduleRuleId() == null) ? 0 : getScheduleRuleId().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", scheduleDate=").append(scheduleDate);
        sb.append(", departmentId=").append(departmentId);
        sb.append(", doctorId=").append(doctorId);
        sb.append(", timePeriod=").append(timePeriod);
        sb.append(", scheduleRuleId=").append(scheduleRuleId);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append("]");
        return sb.toString();
    }
}